Fix backward compatibility with JDK 1.6