Use ldconfig to find libraries

This fixes the dependency check when the libraries are not in /usr/lib. 64 bit openSUSE for instance uses /usr/lib64.