Fix Java 6 compile problem due to weaker type inference.