Improve pasting in ansi-term