Modifications to allow OpenGL examples to build on Osx