Fix cross-compilation issue 1.7 vs 1.8

Allows targeting 1.7 from jdk 1.8.
Details here: https://gist.github.com/AlainODea/1375759b8720a3f9f094