Enable compilation with JDK 8

2 commits which enable the compilation with a JDK 8

Regardless of the source level I was unable to compile Errai with a JDK 8. This PR fixes these problems.