fix few mingw issues