Fix IOException when loading jar resources on Windows.

Closes #1052.