Add support for enum type auto conversion
(issue #27)