Fixing serialize_buffer allocator support, adding unit test