WL-2978 Work across JDK6/7.

This was the underlying problem with running on Jenkins.