sval: cast things correctly in sval_cmp()