Fix map editing in IE 8 & 9.

Fixes #286.
Merge pull request #553 from philipn/fix_ie_map_editing

Fix map editing in IE 8 & 9.