Make it work on mingw as well