How the NSA used a “loophole” to spy on Americans