Check for res_query, then for __res_query in libresolv

Don't know why you check for __res_query, maybe because your version of libresolv doesn't have res_query? Mavericks doesn't have it, but does compile with res_query.

I found a similar commit here:
https://github.com/pasis/libcouplet/pull/2