Application of the coherent anomaly method to percolation