Wall Street ends higher, snaps losing streak