Added fallback to libdir to search for so

Change-Id: I643c4c2b70972f11432b937946457f45fcba27c7
Reviewed-on: http://review.couchbase.org/25507
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>