Reimplement 78b0b66d59693d5bc.

We need to set the correct install_name on shared libraries before
staging them into the destroot, because linking with binaries occurs
during the general build process. If the libraries don't have the
correct install_name set by that time, launching the binary will fail.