Add support for OpenJDK 8

Patch provided by Florian Weimer in rhbz#982683