Fixed failure on systems with 32-bit ints

On pure 32-bit perls (i.e. on 32-bit systems that don't use Perl's
software support for 64-bit integers) some functions would bomb out
with "Modification of non-creatable array value attempted" errors.