s3: make linking of rpcclient --as-needed safe