Improved osx build script