US judge rules wiretaps illegal