SERVER-13824: Remove some typing violations from the v8 code

Code will now work correctly with GCC 4.9.x with full optimization.