#4938: Patch to fix incompatibility with jquery 1.8