fixes to OSX build script