Cheery-picking Adam's fix to get the regression tests working with jdk 1.7.0_45