Window height fix for safari mobile

When viewing a page with safari from an iphone device, the window height is not calculated properly because of the iphone's address bar height. 
A simple fix would be use the window.innerHeight value if present. Otherwise use $window.height()