Fix IE 8 undefined attribute issues