More complex finding of libresolv

There's a problem that on CentOS can't be found by library name resolv
but version specifier ".2" must be appended.  Because GNU/Linux
distribution can't be detected (to our knowledge) we're trying on
possible library name after another which is probably safer way to do
it anyway.