compiler: fix the signature of `add_extern`