OSX: Fix build with QT_NO_OPENGL

Change-Id: I7ed8117ae05ba0eebaf85731c7fdd2bb51d6ed04