Fix win32 build (declaration and code mix)

Change-Id: Id1b9c93df95e28f905732367ef049c5589f2597c
Reviewed-on: http://review.couchbase.org/38631
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>