fix build for java 7