$$
\begin{align}
\int_0^{\pi/2}\frac{x}{\sin(x)}\mathrm{d}x
&=-\int_0^{\pi/2}\frac{x}{1-\cos^2(x)}\mathrm{d}\cos(x)\\
&=-\frac12\int_0^{\pi/2}\left[\frac{x}{1-\cos(x)}+\frac{x}{1+\cos(x)}\right]\mathrm{d}\cos(x)\\
&=\frac12\int_0^{\pi/2}\log(1+\cos(x))\mathrm{d}x-\frac12\int_0^{\pi/2}\log(1-\cos(x))\mathrm{d}x\\
&=\frac12\left(2\mathrm{G}-\frac\pi2\log(2)\right)-\frac12\left(-\frac\pi2\log(2)-2\mathrm{G}\right)\\[6pt]
&=2\mathrm{G}
\end{align}
$$