SERVER-11178: fix 32bit and osx compile numeric cast