compile fix for mingw (thanks to Robert Engelhardt).