some changes to compile with mruby-1.0.0