External noise in stochastic population dynamics: the case of binary environmental switching