Make string comparisons Java 6 compliant