Deprecate use of globally exported moment in case of AMD and CommonJS

This is discussed in #1214. If moment is exported as a global in AMD or
CommonJS print a warning once the global is used.