Fix compilation issues Windows

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