OSX build script fixes