OS X: Fix build with QT_NO_OPENGL

Task-number: QTBUG-31151
Change-Id: I7ed8117ae05ba0eebaf85731c7fdd2bb51d6ed04
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>