make code compiles with jdk 6

This pull request closes #58 it changes the code so that it compiles with jdk 6 instead of 7.