Add support for serializing ByteTypes to ByteBuffers.