use parentNode rather than parentElement for better SVG support
fixes #3