Backwards compatibility for jQuery < 1.7