build for windows with mingw fix for 4.1