jQuery 1.9 compatibility

This is an alternative to #21. It fixes the issue, but it adds a dependency on jquery-migrate, and it will cause a warning to be issued whenever fancybox is used, so it's not ideal.

Opening this PR to weigh up the alternative solutions.