fixes for mingw64