Some OSX improvements
Fix Textsurface's segfault
Merge pull request #197 from vlag/master

Fix Textsurface and some OSX improvements