fix mrb_value handling to support NaN boxing

mruby-thread does not work with NaN boxing.