This reverts most of revision 3092cf163eb4. The change worked on x86 architectures, but did not work on ARM, probably due to extra ABI flags in the ldconfig output.