Updated for compatibility with svg.js v0.11