5.9-magnitude quake hits northern Afghanistan