Fix to compile with TypeScript 0.9

* Fix declaration of sort_by function to compile with TypeScript 0.9
* Update jquery.d.ts