This is change fixes bug #186 for JDK 1.6

The previous commit for #186 does not work on any version before JDK
1.7.