Fix compilation on OpenBSD
refdb tests: use the right variable size

Mixing int and size_t through pointers leads to problems
in big-endian machines.
Merge pull request #1468 from carlosmn/obsd-sparc64

OpenBSD & sparc64 fixes