mingw bug workaround