restoring mingw build broken by #2061