Added supper of AMD and Node.js (via browserify) environments