Well technically all your bathroom fan is doing is moving out either moisture or smell, therefore you could even just vent it into your attic and not even worry about putting it out a window. Most likely your attic has some type of vent anyway (weather it be fans or just natural air flow), therefore it would be find to do it in the attic.