small changes to build scripts on OSX