Fixed AMD Loading for moment

Latest moment throws deprecation warning if trying to use it from global namespace. 
Wrapped up plugin code into define() if define.amd is present or use globals if not. 
Codestyled (sorry)