Ghost conditions for Gauss-Bonnet cosmologies