UN rights chief warns against anti-terror measures