Properly use global this to export moment

Don't assume this is bound to the global scope in local functions.

Related to #1179

@Xotic750 you mentioned something about returns on every code-path. I didn't find such an option in jshint. Can you double check and maybe propose other jshint options we should enforce to make moment strict mode compatible?