Entanglement between collective fields via phase-dependent electromagnetically induced transparency