German court limits power of spy agency's bugging overseas