Optional dependency from Hibernate 3.x and 4.x