Fix for #33

For enums, use the actual underlying enum type instead of always using Int32.