fix #8678, reading large files on windows

read() on windows takes a uint, so apply a similar io limit per call
as done on mac (directly reusing the same code would give a compiler
warning, since long is 32 bits on windows)

@vtjnash, look ok? I was able to `read!` a 6 GB file with this change.