Make old WebKit workaround a bit more specific and turn it off for high-density devices

This change for issue #2725 makes the Webkit bugfix a bit more specific and turns it off for higher dpi devices that would be running a newer version of Webkit.