Fix Java 7 compilation warnings