Fix negative division in JIT

Also fix divide-by-zero in mod_i, since mod_i
is implemented by signed division anyway (and
n % 0 has no mathematical sense).