kde_generate_export_header: convert from deprecated string methods
Assume Python >= 2.7, and use the builtin methods of strings ('str') instead of the deprecated 'string' counterparts, for Python 3 compatibility.