Fix compilation for java6