fix scripted build for osx