add support for callbacks in jQuery polyfill