SERVER-11814 Fix overflow on 32 bit systems