fix compiling on mingw