Trying to create a wxPaintDC for the wxGLCanvas window fails with an
assertion about something which it seems is no longer always true in
macOS 10.14. To avoid this we check for the assertion condition first
and temporarily disable assertions while we create the wxPaintDC.