Extension of Ramanujan's congruences for the partition function modulo powers of 5