Make sure window.addToHomescreen is always defined

On IE8, before this change, window.addToHomescreen was not defined. This change ensures that it's always defined.