Adapt changes from jsonld.js: https://github.com/digitalbazaar/jsonld.js/pull/259
Adapt changes from jsonld.js:
digitalbazaar/jsonld.js#259