Add @extends annotations to generated externs

See #2615.