Fix overflow when comparing two ints by promoting the sum to 64-bits.

R=reed@google.com, scroggo@google.com

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/505153003

bug: 17265206
Change-Id: Id74fc6d165b55258dbd980d9d36afe1377e7a162
(cherry picked from commit fa7f4a711e9656bb6f34293c6dd503e40d1b7f86)