Fix compose-buffer for wrapping ByteBuffer

Wraps a ByteBuffer, bytearray or ByteBuf properly.