Fix size calculation when width/height aren't explicitly specified on <svg>

Root cause: FF follows SVG spec closely.
https://bugzilla.mozilla.org/show_bug.cgi?id=736431#c5
http://www.w3.org/TR/CSS21/visudet.html#block-replaced-width
http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height

Similar errors can be caused in other browsers under related circumstances.

Close #379.