Added large file support

Hi!

I've added large file support. In this process I had to update/fix the autotools files to check for large file support.

I've tested it with gcc and clang.