Fix Issue 7822 - lseek cast(int)offset should be lseek cast(off_t)offset

Currently, files bigger than around 2GB are truncated when mmap is used. This fixes it by using off_t instead of int as this is what the system call requires on Linux and Mac OSX.

Tested on Mac OSX.