US stocks close higher on tech gains