Compile fixes for win32

Change-Id: I5dd91efa3089b1a312f96141459ad593726a66ef
Reviewed-on: http://review.couchbase.org/32428
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>