Fix for issue #177 with mingw