Cross-browser workaround for function binding