fixes to build scripts so that they work in both OS