Fixes _ not defined error when loaded with amd

Related to #44

Replaces pull #73 which was directly from my master branch and using a feature branch intead