Compatibility with older JDK.
Merge pull request #596 from fineswap/source-1-5-compat

Compatibility with older JDK.