made it compile on mingw!