Ensure that mingw utilizes Windows error codes instead of *nix codes