Fix warnings about JRE 1.6