fix compatibility with newer jQuery versions