Entanglement of Two Coupled Atoms in the Presence of a Time-Dependent External Magnetic Field