US stocks close with losses led by tech shares