Added check that we're building with JDK 1.6.

As otherwise we get failures after about 10 minutes