Add esprima as an optional dependency.

Esprima is required only for running certain tests.