preserve windows error numbers as well
Merge pull request #1935 from ethomson/winerrs

preserve windows error numbers as well