Fix enum types to work with java ver. 6
Update to support java 6