Add support for serializing enums