Fix building with OpenGL on MacOS X.