Fixed a jQuery 1.9 related issue, closes #638