fix history undefined bug on jsb