fix build script for Windows and Mac