Fix test compilation to use JDK 7