Fix compile problems on macosx

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