Fix reading binary files on Windows.