Omit adding attributes if they don't contribute anything.

Makes the generated svg markup somewhat less verbose.