Fix compilation on Windows with mingw (hope it works with VS as well)