Fix issue with invalid reading of byte size

The buffer isn't marked on stack and doesn't need to be since we copy
data. This does mean however, we shouldn't read from it after we have
possibly gc'ed. By storing the buffer size at the beginning we ensure we
don't need to read it later.