Fix broken requirejs loading scheme

The current AMD loading scheme defines the AMD module *after* multiple references to Backbone and moment have been made. This can cause a race condition in applications that do not use a shim. Even with the use of a shim, this causes more strange behaviour as it then defines an AMD module (which requirejs strongly recommends against doing).

I wrapped the moment.picker definition in another function that is called after checking for AMD support or not, with the correct variables. This seems to solve the issue.

Also, fixed a test bug. :)