Use namespaced enums

rust-lang/rust#18973 changed the behavior of enums. Enums are now
namespaced.
Merge pull request #19 from barosl/namespaced-enums

Use namespaced enums