Make build compatible with java 7