code.set_method(): workaround for Object.defineProperty @ IE8