adjust code remained for mingw.