BUG: enable windows large file support for mingw

The (non-lfs) posix api mingw otherwise uses does not seem to work on win32.
The windows lseek prototypes are available in the ancient mingw32 version
we use for our windows binaries but not the fseek/ftell, so they are
defined manually.
Merge pull request #4399 from juliantaylor/mingw-filefix

BUG: enable windows large file support for mingw