src: fix VC++ warning C4244

`NumberValue()` returns a `double`. Might as well also change this to `value->Int32Value()`.