Improved calculation of app scale factor, now fine for at least Chrome,
Safari, FF.