added option to keep elements within defs
Merge pull request #2 from flosse/keep-unreferenced-defs

added option to keep elements within defs