adjustments to build on windows with mingw