Do not assume sizeof(size_t)

This fixes an assumption that sizeof(size_t) == sizeof(uint64_t), which
is not guaranteed. At least on NetBSD/i386, size_t is 32 bit long.

Caught by tests/basics/file-snapshot.t

This is a backport of Ib7620a2ffe8758521886af37bc280101a040d860

BUG: 1138897
Change-Id: Ie0b80ee9ddbcccaf9fd4f5d28d80fcd080b0ed40
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8631
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>