fix SEGV bug for mrb_str_new

mrb_str_new causes seg-fault when 3rd argument is negative.
Merge pull request #1762 from cubicdaiya/issues/mrb_str_new_bug

fix SEGV bug for mrb_str_new