Impact of the nuclear symmetry energy on the pygmy dipole resonance