Optimize isFunction only when appropriate.

Closes #1929.
Test typed arrays are functions
Merge pull request #1936 from jridgewell/isFunction_safari_8

Optimize isFunction only when appropriate.