Please allow me to elaborate a little on Riemann's and Jeb's elegant exposition.
So imagine the contour $\gamma$ as coming just "above" the real axis from $+\infty$ to $0$ and then swinging counterclockwise around the origin, and then going back just "below" the real axis back to $+\infty$.
As Riemann suggests, we can write $(-x)^{s-1} = e^{(s-1)\log(-x)}$. But what should $\log(-x)$ be equal to for positive $x$?
As Jeb suggested, $-1 = e^{i\pi} = e^{-i\pi}$, so we can write $\log(-x)$ as $\log(e^{i\pi}x) = i\pi+\log{x}$, or as $\log(e^{-i\pi}x) = -i\pi+\log{x}$. However, we must make choices that preserve the continuity of $\log(-x)$ as $x$ moves along the contour in the complex plane. Also, as Riemann specifies, we want $\log(-x)$ to be real when $x$ is negative.
For the piece of the contour from $+\infty$ to $0$, we must choose
$$\log(-x) = -i\pi+\log{x}.$$
On the way back from $0$ to $+\infty$, in order to preserve continuity we must have
$$\log(-x) = i\pi+\log{x}.$$
Thus, the integral for the part of the contour from $+\infty$ to $0$ is equal to
$$\int_{+\infty}^0 \frac{e^{-(s-1)i\pi}e^{(s-1)\log{x}}}{e^x-1}\,dx = e^{-\pi si} \int_0^{+\infty} \frac{e^{(s-1)\log{x}}}{e^x-1}\,dx.$$
And the integral for the part of the contour from $0$ to $+\infty$ is equal to
$$\int_0^{+\infty} \frac{e^{(s-1)i\pi}e^{(s-1)\log{x}}}{e^x-1}\,dx = -e^{\pi si} \int_0^{+\infty} \frac{e^{(s-1)\log{x}}}{e^x-1}\,dx.$$
Now add those two pieces together to get Riemann's result.