Improved extension methods for enum serialization/deserialization.