Fix problem when calculating checksum in platforms with different architectures