Update pattern.class.js

Added hack to support repeat and offset to svg export.
Merge pull request #1786 from asturur/fix-for-pattern-ToSvg

Add some functions to pattern.ToSVG()