Compatibility fixes for Chrome and Safari.