The anomalous chiral Lagrangian of order $p^6$