Be resilient to fn.name not existing in IE

Fixes #516.
Merge pull request #598 from spicyj/gh-516

Be resilient to fn.name not existing in IE