Fixed some compatibility issues with Chrome 31.