fix a compile error in mingw