* Added byteLength parameter to WrapMemory method and check that the memory is at least the size of byteLength