Add cast to remove compiler warning (causing build break)

Change-Id: Ifd22bd8223269a3a9f5711a3c476a3842886ae1a
Reviewed-on: http://review.couchbase.org/30399
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>