Port from CM: Allow building with OpenJDK v1.7