findlib.sh: improvements

posix compliance, use ldconfig to get additional LIBDIRS,
also respect LIBDIRS env variable
Merge pull request #520 from karolherbst/findlib

findlib.sh: improvements