Polyfill for Function.isFunction() method