My changes

The following changes make it work better on OS X, as well as the released version of SDL2.