Add support for serializing anonymous types