Add support for generic type factories (without constraints).