Magnitude 6.4 quake hits Pakistan and Afghanistan