Work around a but on jQuery 1.9.1 and 2.0