only build session factory for hibernate 4.3 (fix failing tests)