Fix exception raised with non-in-DOM elements or hidden DOM elements

Using an SVG with a non-in-DOM element or with a hidden (display: none) DOM element causes an exception:

    <div id="el_with_display_none" style="display:none"></div>
    var div = document.createElement("div")
    // or div = ("el_with_display_none")
    var draw = SVG(div).size(300, 300)
    var rect = draw.rect(100, 100).attr({ fill: '#f06' })
    #=> svg.js (riga 2107): TypeError: pos is null