US spy agency loses eavesdropping powers