Fix a few issues with building on OSX

NOTE: The version of OpenGL shipping with OSX only really supports the
OGL2 examples for now. I haven't been able to completely figure out why
the OGL3 examples just die.