Support for CommonJS - issue #6

PR includes a unit test see [1].

[1] - https://github.com/richardwilly98/elasticsearch-lang-javascript/commit/e3c03936fdd0caa0407ff108aa22d363ce24c2a1#L2R207