Fix to support jQuery 1.7