Revert "Hack #2"

This reverts commit 306244b190bc230ca6d09bc3b2a1c0230e8a1aaf.
Use SetErrorMode instead of SetThreadErrorMode.

The latter is only available starting with Windows 7 or Windows
Server 2008 R2.

More importantly, even some recent MinGW toolchains (such as the
mingw-w64 toolchain in Ubuntu 13.10's official repository) do not
have for support it yet (as of 2013/01/16).