Judge rules NSA spy efforts may be unconstitutional