Fixed build script for OS X