__synthTest() fails in Firefox

In Firefox 27.0.1 (latest stable), the linkHrefJS test fails with a warning that __synthTest is not a function.

This seems to happen because by the time the link click is simulated, the function has been overwritten with the original __synthTest function (which defaults to undefined).

Wrapping the window.__synthTest = oldSynth in a function seems to address this issue.