Make macro recording work with Exporter (rebased onto dev_5_0)



This is the same as gh-986 but rebased onto dev_5_0.

----

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