mi_http: fix output for mi commands that require periodic flush
 - backport from trunk (rev# 9737)