AMD compatible

I've made some changes to get Spinner from an AMD injection instead of looking for it with angular's $window instance since spin.js doesn't put the class in the global window when RequireJS is used.
```
Support for spin.js when packaged through RequireJS and thus not available in the global window.
```