Fix comment typo in support-legacy-browser().
Refactor support-legacy-browser() to improve readability and performance.