Bugfixes when localStorageService is called from outside

Hello,

Today I submit a patch to fix fatal JS errors when localStorageService is called from the outside by an Angular Injector.

### How to reproduce the bug:

```javascript
angular.element('html').injector().invoke(['localStorageService', function($localStorageService) {
     console.log($localStorageService.get('cookiesWarning'));
     $localStorageService.set('cookiesWarning', 1);
     console.log($localStorageService.get('cookiesWarning'));
}]);
```