Fix dynlib paths in the RTS too; part of #7833