mingw compatiblility fix