Wrapping/unwrapping handlers properly.

Summary: https://code.google.com/p/esprima/issues/detail?id=502

Test Plan: npm tests