Fixes for codemirror v4

This is for https://github.com/adobe/brackets/issues/7543