adding compile conditions for java 7