add new function saveTextAs

This new function is just an extend for original saveAs, and also add support for IE 9-