IE8/javascript compatibility