Fix SVG mask scaling and placement in Firefox

Fixes #2. It seems Firefox (at lesast on Mac, v34) handles SVG masks
differently from Safari and Chrome. If the masked SVG uses viewBox, we
need to transform the mask (its size and scale) to follow these changes.
Chrome and Safari do this automatically, but we'll need to watch for
similar problems in other browsers.

See comments in code for more explanation and workarounds.