Update for compatible with Mingw