use mrb_int as possible based on a patch from @monaka; close #994