avoid memcpy size error when off_t == 32bits by using an intermediate 64-bit offset