On the maximum principle for second-order elliptic operators in unbounded domains