fix compiling in mingw