add `as` method to VM::Object
move `as` method to Util.pm