Updated build script for OSX