Merge fix for #211 into v2 branch

Repeat of https://github.com/jakerella/jquery-mockjax/pull/213 to be merged into branch `v2`, plus other improvements discussed there.