Make sure window.addToHomescreen is always defined

Since 3b82a5fd4b2cf3fb48772a0d12bb1a438b403811, on IE8, window.addToHomescreen is not defined. This change ensures that it's always defined.

Without this change, the only safe way to initialize addToHomescreen is like this:
```javascript
if(addToHomescreen != null){
   // addToHomescreen can be null on IE8
   addToHomescreen();
}
```