Make compatible with jquery 1.9