Make Wire code more safe.

Fixes work on IE8.
Correct check if shims are loaded in the client loader.