Fix a last_error() for Windows.