Fix find_libdepends and find_libprovides functions.