Support type parameters for externs

Fixes #110