Improve JS performance for IE8.