Entanglement as a resource for discrimination of classical environments