Algorithm for suppressing ventilator autotriggering