[libvirt PATCH 3/4] ch: fix logic in virCHMonitorBuildPtyJson