Support generic types when emitting constructors