Fixes jQuery 1.4.x compatibility bugs