Support building with openjdk 7 (in particular for Ubuntu 14.04)