Fix bug retrieving bytes from the SlicedByteBuffer by James Duong

 - when the buffer > 256
 - or buffer >2GB on 64-bit platforms  (uint32_t is not enough)