This modification to the margo.la file causes projects linking against margo that use libtool to automatically add rpath to mercury.
libtool already sets rpath to the margo library, but it actually needs mercury as well at that level because margo.h makes direct calls to HG_ functions in the mercury library.