fix NPE when opening hbm.xml files with hibernate 3.6, 4.0 and 4.3