Backporting the fix for #222 to 1.2.x

This is the same fix already applied to the master branch in https://github.com/okfn/annotator/commit/a968009b24ed90955ace939facdb8f0fce3f0d1d; this time agains the v1.2.x branch