Fix build related problems on win32

Change-Id: Id5ccc1331e9d662356e6de78b17c7fdb7983dbee
Reviewed-on: http://review.couchbase.org/29580
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>