Snow Leopard: build.sh: Fix some bugs