Fix OpenGL context configuration on OSX