Fixing JDK 7 build compatibility issue