Fix mobileGrade function for desktop IE.

(cherry picked from commit 0429a96fd686482a0a89cbc1dd4ddd7e36a09736)