Fixed build script for OSX