Fix compilation errors under java 8
Merge pull request #218 from cbeer/java8

Fix compilation errors under java 8