Fix building on java 8