Prevent failure in web workers on IE.

Sorry for the incidental whitespace cleanup, I can take it out if needed.