Compile on Java8. Fixes #2149