This makes sure to pick up the actual error codes on windows. Signed-off-by: Martin Storsjö <martin@martin.st>