glib: Add casts from size_t to gsize

This unbreaks cross compile builds:

configure --target-list="i386-softmmu" --cpu=i386

When building on a 64bit machine.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>