Make macro recording work with Exporter

This should fix the following issue:
http://trac.openmicroscopy.org.uk/ome/ticket/12123