Improved compatibility with mmm-mode in JavaScript.