Resolve compile errors with JDK 1.7.
Merge pull request #26 from richardxx/master

Resolve errors with JDK 1.7