Use the not-deprecated method to build a SessionFactory.