Fix incompatibility with jQuery 2.

Fix #463.