Improve HibernateDomainExporter generics handling

Fixes #849