Moves the `isfinite` workaround to a `risfinite` function in utils
Also fixes `extproc/js_job.cc`