The roots of the equation $x^{2N}-1$ are $\theta^n$, where $0 \leq n\leq 2N-1$ and $\theta=e^{2\pi i/2N} = e^{\pi i/N}$.
The sum of these roots is $0$ (by Viete's formula).
The even powers of $\theta$ are the roots of $x^N - 1$; by the same argument, the sum of these roots is $0$; this means that the sum of the odd powers of $\theta$ is also $0$.
We have:
$$\begin{align}
0 &= \theta + \theta^3 +\cdots + \theta^{2N-1} \\
&= (\theta + \theta^3 + \cdots + \theta^{N-2}) + \theta^N + (\theta^{N+2} +\cdots + \theta^{2N-1}) \\
&= \sum_{n=1}^{(N-1)/2}\theta^{2n-1} + \theta^N + \sum_{n=(N+3)/2}^{N}\theta^{2n-1}
\end{align}
$$
Now, $\theta^N = -1$, $\theta^k$ and $\theta^{2N-k}$ are complex conjugates, and
$$
\theta^k + \theta^{2N-k} = 2\cos(2k\pi/2N) = 2\cos(k\pi/N)
$$
We can therefore combine the two sums and get:
$$
2\sum_{n=1}^{(N-1)/2}\cos((2n-1)\pi/N) - 1 = 0
$$
from which the result follows.