Added support for serializing/deserializing enums