On the similarity solutions of the KdV equation with variable coefficients