Use tools.functionName(fn) instead of fn.name

Getting the name of a function does not work properly in IE.
Warn for old IE versions