Added compatibility for jQuery UI 1.10+. Closes #2021.