fix SEGV bug for mrb_str_new_static

mrb_str_new_static causes seg-fault when 3rd argument is negative.
Merge pull request #1763 from cubicdaiya/issues/mrb_str_new_static_bug

fix SEGV bug for mrb_str_new_static