Fix build script for os x.