Added explicit typecasting to avoid msvc compiler warnings.

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