Magnitude-6.1 quake rattles Afghanistan and Pakistan