Enhancement of gravitational waves induced by scalar perturbations due to a sudden transition from an early matter era to the radiation era