Fix bug in cpp_int serialization code