add support for percentage width and height styles

Problem:  <svg> elements styled with percentage widths or heights (e.g. `width: 100%`) throw an error on the line `cs.clip = "rect(0 " + width + " " + height + " 0)";`

Proposed solution:  apply to the canvas whatever width/height are provided, then if width/height are percentage strings, read the computed (pixel) width/height using offsetWidth and offsetHeight, passing those values to the cs.clip property.

Not extensively tested, but fixed the bugs I was coming up against.  Hopefully someone with more knowledge of this project can review and see if this is a suitable fix.