Fix endianness issues
We cannot safely load a 32 bit integer into a struct field which expects a 64 bit value: we must load it into a 32 bit integer first, and then assign the value to the structure field.
This bug was causing test failures on s390x: https://gitlab.com/accounts-sso/libaccounts-glib/issues/2