Fix pr20078.

When linking llvm.global_ctors with the optional third element we have to handle
it specially and only copy the elements whose keys were also copied.