On free surfaces in hydrostatic flows