Compile under jdk1.7. Small fixes