fixed source compatibility with both Java 1.6 and Java 1.7
(cherry picked from commit 94bd201)