largefile support patch by Roy Sigurd Karlsbakk <roy at karlsbakk.net>