Patch from Richard Boulton for large-file support. Works by using