mingw compatibility fix