Fix javac 8 compilation problems