fixes in script for multiplatform build