Allow openjdk-style version strings.

This fixes http://forums.gradle.org/gradle/topics/gradle-fails-to-detect-the-java-version-when-using-openjdk-8