OSX fixes for gyp build