Add support for JDK 6.

Previously JDK 7 was required to compile the project due to the use of a few switch statements on strings.