Fix Java 7 compatibility.