Try to fix the mingw build.

* MingW needs mapWindowsError.
* MingW is missing some entries in std::errc, but we don't use them.