I think I've figured it out, so I'm posting it here for future reference.
We will assume for simplicity that $\mathcal{F}$ is transversely oriented (otherwise it can be lifted to an orientation covering). Lemme 3.1 of the paper in question shows that the structural algebra of $\mathcal{F}$ is $\mathbb{R}^d$. We consider the transverse orthonormal bundle $M^\#$ of $\mathcal{F}$ (a.k.a. the Molino bundle) with the lifted foliation $\mathcal{F}^\#$. It's known by Molino's theory (see the book "Riemannian Foliations" by P. Molino) that the restriction of $\mathcal{F}^\#$ to a leaf closure $N=\overline{L^\#}$ is developable to a Lie-$\mathbb{R}^d$ foliation. In other words, this restriction is defined by closed $1$-forms $\alpha_1,\dots,\alpha_d$, that is, $$\mathcal{F}^\#|_N=\bigcap_{i=1}^d \ker(\alpha_i).$$ Let's see this in more detail: we have that $\alpha=(\alpha_1,\dots,\alpha_d)$ is a $\mathbb{R}^d$ valued Maurer-Cartan form on $N$ that defines $\mathcal{F}^\#|_N$. Now we aply Darboux construction: consider the connection $\eta$ on $N\times\mathbb{R}^d$ given by $$\eta_{(x,g)}(\xi,v)=\alpha_x(\xi)+v$$ (here we identify $T_g\mathbb{R^d}\equiv\mathbb{R}^d$). It's not difficult to see that $\eta$ is flat and so it determines a foliation $\mathcal{F}_\eta$ on $N\times\mathbb{R}^d$. Choose $x_0\in N$ and take $\hat{N}\in\mathcal{F}_\eta$ the leaf containing $(x_0,0)$. Then $\pi:=\mathrm{pr}_1|_{\hat{N}}:\hat{N}\to N$ is a covering and $f_\alpha:=\mathrm{pr}_2|_{\hat{N}}:\hat{N}\to\mathbb{R}^d$ is a submersion. E. Fedida's theorem (Theorem 4.1 in Molino's book) states that the foliation $\pi^*(\mathcal{F}^\#|_N)$ coincides with the foliation determined by the fibers of $f_\alpha$ (that is, $\mathcal{F}^\#|_N$ is developable over $\mathbb{R}^d$). Now the action of $\pi_1(N,x_0)$ on $\hat{N}$ defines the homomorfism $h_\alpha:\pi_1(N,x_0)\to\mathbb{R}^d$, whose image is $$H_\alpha=\{g\in\mathbb{R}^d\ |\ \hat{N}g=\hat{N}\}$$ (Juxtaposition represents the natural action of $\mathbb{R}^d$ on $N\times\mathbb{R}^d$). By definition, we have the identity $\hat{x}\cdot\gamma=\hat{x}h_\alpha(\gamma)$, for all $\hat{x}\in\hat{N}$ and all classes $[\gamma]\in\pi_1(N,x_0)$, which induces the $h_\alpha$-equivariancy of $f_\alpha$: $$f_\alpha(\hat{x}\cdot\gamma)=f_\alpha(\hat{x})+h_\alpha(\gamma).$$
Denote by $\overline{H_\alpha}$ the closure of $H_\alpha$ in $\mathbb{R}^d$. Then $\mathbb{R}^d/\overline{H_\alpha}$ is a Lie group and, by the $h_\alpha$-equivariancy, $\mathcal{F}_\alpha$ induces a submersion $\overline{f_\alpha}:N\to\mathbb{R}^d/\overline{H_\alpha}$ whose fibers are the closures of the leaves of $\mathcal{F}^\#|_N$. (In our case specifically, $\mathcal{F}^\#|_N$ has dense leaves, so $\overline{H_\alpha}=\mathbb{R}^d$ and $\overline{\mathcal{F}^\#|_N}$ is the trivial foliation with $N$ the only leaf)
Let $\gamma:[0,1]\to N$ be a smooth path with $\gamma(1)=x_0$ and let $\hat{\gamma}$ be the lifting of $\gamma$ to $\hat{N}$ satisfying $\hat{\gamma}(1)=(x_0,0)$. Then we may write $\hat{\gamma}=(\gamma,\tau)$, $\tau$ being a smooth path in $\mathbb{R}^d$. We have $\tau(1)=0$ and $\tau(0)=f_\alpha(\hat{\gamma}(0))$. As $\hat{\gamma}([0,1])\subset\hat{N}\in\mathcal{F}_\eta$, it follows that $$0=\eta\left(\frac{d\gamma}{dt},\frac{d\tau}{dt}\right)=\alpha\left(\frac{d\gamma}{dt}\right)+\frac{d\tau}{dt},$$ and so $$f_\alpha(\hat{\gamma}(0))=\tau(0)=\int_0^1\alpha\left(\frac{d\gamma}{dt}\right)dt=\int_{[0,1]}\gamma^*\alpha.$$ In particular, for $[\gamma]\in\pi_1(N,x_0)$, we have
\begin{equation}\displaystyle \begin{array}{rcl} h_\alpha(\gamma)&=&\displaystyle f_\alpha((x_0,0)\cdot\gamma)-f_\alpha((x_0,0))=f_\alpha(\hat{\gamma}(0))=\int_{[0,1]}\gamma^*\alpha\\ &=&\displaystyle\left(\int_0^1\alpha_1\left(\frac{d\gamma}{dt}\right)d t,\dots,\int_0^1\alpha_d\left(\frac{d\gamma}{dt}\right)d t\right).\end{array} \end{equation}
The image of $h_\alpha$ is abelian, so it factors to $\overline{h_\alpha}:H_1(N,\mathbb{Z})/T\to\mathbb{R}^d$, where $T$ is the torsion subgroup of $H_1(N,\mathbb{Z})$. Denoting $\overline{h_\alpha}=(\overline{h_\alpha^1},\dots,\overline{h_\alpha^d})$, the equation above shows that $\ell_{DR}[\alpha_i]=\overline{h_\alpha^i}$, where $\ell_{DR}:H^1_{DR}(N)\to H^1(N,\mathbb{R})$ is De Rham's isomorfism.
Take $[\vartheta_1],\dots,[\vartheta_r]$ a free abelian basis of $H^1(N,\mathbb{Z})\subset H^1(N,\mathbb{R})$. Then, $$\ell_{DR}([\alpha_i])=\sum_{j=1}^r c_i^j[\vartheta_j],$$ $c_i^j\in\mathbb{R}$. If $\sigma_1,\dots,\sigma_r$ are smooth loops representing the basis of $H_1(N,\mathbb{Z})/T$ dual to $\big([\vartheta_j]\big)_{j=1}^r$, it follows that $$H_\alpha=\overline{h_\alpha}\big(H_1(N,\mathbb{Z})/T\big)=\left\langle\big(c_1^j,\dots,c_d^j\big)_{j=1}^r\right\rangle,$$ because $c_i^j=\int_{\sigma_j}\alpha_i$.
Now we take $[u_i]\in H^1_{DR}(N)$ such that $[\alpha_i]+[u_i]$ are rational cohomology classes. We can choose $[u_i]$ small enough so that $\alpha_i'=\alpha_i+u_1$ are linearly independent in every point of $N$. Then $\alpha'=(\alpha_1',,\dots,\alpha_d')$ is a new Maurer-Cartan form that defines a foliation $\mathcal{G}^\#$ of $N$. (this is the construction that Ghys does in the proof of Théorème 3.3). Because the new classes are rational, we now have $$H_{\alpha'}=\overline{h_{\alpha'}}=\left\langle\left(\int_{\sigma_j}\alpha_1',\dots,\int_{\sigma_j}\alpha_d'\right)_{j=1}^r\right\rangle,$$ with $\int_{\sigma_j}\alpha_i'\in\mathbb{Q}$ for all $i$ and $j$, so $\overline{H_{\alpha'}}=H_{\alpha'}$ is a lattice of $\mathbb{R}^d$ and so $$\overline{f_{\alpha'}}:N\to\mathbb{R}^d/H_{\alpha'}\cong\mathbb{T}^d$$ is a fibration defining $\overline{\mathcal{G}^\#}$. It also shows that $\mathcal{G}^\#$ is a closed foliation.