fix encoding in flag enumerations
handle EnumMemberAttribute appropriates for #23