Fix version recognition under custom JDK builds