Consistently use int32_t when serializing messages.