fix to compile on mingw32