added code to fix broken svg output (caused by bug in cairo driver) closes gh-4