more fixes for osx.sh