Fix memory reallocation bug on x86_64

When changing from using two arrays to using one array
of structs containing two values I forgot to change the
size of the items in realloc. Previously it used
sizeof(uint32_t) for each item. I wrote this change
on my work machine which is x86. And since pointers on
x86 are 32-bit using sizeof(uint32_t) was fine on my
work machine. But when it was tested on Travis it failed
since they are using x86_64.