JBIDE-15494 : fix discovery when using JDK1.7.0_40

apply Mylyn's fix to our forked Discovery strategy