Wrap 'exports' in a factory function to prevent `define` from interpreting it *as* a factory when it is a function.

Fixes #268.