Fix build problems with mingw

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