fix memory leaks in mruby-random