replay: fix on 64-bit systems

The .length field of arrays is of type size_t when written, but it is
read back as an integer which is a different size and causes the
remaining reads to be misaligned.