Added support for CommomJS and AMD