Fix enum types to work with java ver. 6
Merge branch 'hotfix-openjdk-6-support'