Changed export to support requirejs.