Make javascript work with jQuery 1.9.