build.sh fixes/workaround for linux/mac.