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)
Merge pull request #8689 from JuliaLang/tk/fix8678

fix #8678, reading large files on windows