Minor cleanup
Improve handling and robustness for GL on OS X
Merge pull request #345 from eile/master

Improve handling and robustness for GL on OS X