Build fails in i386 arch

Casting all size_t types to long unsigned int.