Prevent errors in older jQuery versions.

Closes #118.