IE8 compatibility changes to utils.js