finish porting es5-shim