Fix parsing of square bracket characters in IMAP response strings (#1489223)