Fixes for a Sublime Text 3 compatibility

Tested on OSX 10.8.2
ST3 build 3037