Backward compatibility tweaks.

Adjustments to improve visual glitches in the native Android browser.
Consolidated browser detection.
Refactored use of SVG image masks to SVG background images for
consistent rendering on Android.