Performance improvement on Harmony

The harmony counterpart of https://github.com/ariya/esprima/pull/169