Support Hibernate 4 in addition to Hibernate 3. Fix bug #193.