Use underscore function to improve cross-browser compatibility.