Support for multiple hibernate versions