Compile with JDK 1.7

(cherry picked from commit 65083db34267e85e3a66991a53cf8151c542b49e)