Bug 878843 - Integrate with replaceSurroundingText for autocorrect (with...

... fallback for older builds of gecko)