cast intptr_t to mrb_int to pacify compiler warning; close #2148