Fix build.sh for source build on MacOS 10.7+