Magnitude 5.1 earthquake rattles northeastern Iran