fix compilation for mingw