Man pleads guilty to firing rifle at Connecticut mosque