Fix linking for Solaris

Change-Id: Ifb128d5f3dd30638b566b08ffabee1cda56caf3e
Reviewed-on: http://review.couchbase.org/34880
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>