I wouldn't worry so much about overriding that define, as svg-end can only be used at that one spot or the output file would be corrupted.
A patch that included a proper override was provided 9 years but ignored. I'll get the relevant parts of the patch up-to-date as it is proving potential. Thanks for your solution; I was discussing with OP on IRC the potential ways to bodge the feature, but came up a bit short on both your suggestions, Aaron. Also I didn't know about those undocumented features! Étienne