Fix map editing in IE 8 & 9.

Fixes #286.