While reading up for a question on Cryptography.SE I stumbled across quite a complex equation approximating the bias of a "down-sampling" function. The original paper is "The Security of DSA and ECDSA Bypassing the Standard Elliptic Curve Certification Scheme" by Vaudenay (PS).
The question on Crypto.SE has a full quote of the relevant section, but I will re-state things here.
Suppose we have a prime $q\in\mathbb P$ from the interval $[2^{N-1},2^{N})$. Suppose further we have an integer $k\in\mathbb N$, that is uniformly, randomly sampled from the range $[0,2^N)$. Now suppose we construct $\mathbb N\ni k'=k\bmod q$, obviously "all the numbers larger than $q$ get wrapped around" which means that the probability that $k'\in[0,N-q]$ is double as high as for the rest of the interval $[0,q)$.
Now the paper states that this leads to the bias $$E\left(e^{\frac{2i\pi k}q}\right)\approx \frac{q e^{i\pi\frac{N-1}q}}{\pi N} \times \sin\left(\frac{\pi N}q\right)$$
My question is "simple":
From the above definitions, how do we arrive at this approximation?