Optimum shapes of bodies in free surface flows