typename patch supplied by Ceri Storey <http://article.gmane.org/gmane.comp.parsers.spirit.general/8396>