Cast sizeof to long

Change-Id: I65c03a11b0c973b1f0b016d15e051867be4f8fbe
Reviewed-on: http://review.couchbase.org/24274
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>