Fix more problems in the mac build script