sync build script for msvc with mingw