Views RSS channel properties added with hook_views_query_alter() disappear
You can do this with Views RSS 2 and hook_views_rss_item_elements().

As we can see in the documentation for Views RSS API views_rss_get it can :


  Fetch item elements provided by other modules.


So to create your own item element do the following :


First thing, revert your hack, it won't be needed.
Download and install the module Views RSS (and Core Elements, DC Elements)
Create a default view for content and fields
Add a feed to it
Style it as RSS Feed - Fields
In the settings pubDate is avaible alerady so we don't have to worry about that.


Create a tiny module and enter the following

/**
 * Implements hook_views_rss_namespaces().
 */
function MY_MODULE_views_rss_item_elements() {
  $elements['dc:lastBuildDate'] = array(
    'description' =&gt; t('My custom lastBuildDate field.'),
    'help' =&gt; '',
  );
  return $elements;
}


Then install it and clear your cache.

Now, in the Views RSS field settings there should be a new field for your custom field (see image)



And when you view your feed it should be included (see image - last line)



Note: if you look at the snippet, it adds the field to the dc namespace. If you want to use another or provide your own namespaces have a look at the API and hooks.