serialize defined optional Interactive attributes

If an optional top-level attribute is undefined don't
serialize it.

Examples: 'importedFrom', 'fontScale