make build compatible with Java 6 & 7
Merge pull request #24 from p6spy/java6

make build compatible with Java 6 & 7