Ergodicity of billiard flows and quadratic differentials