Updated build script for osx.