Use Java 1.6 method instead of the 1.7-only one.