I have always tried to work with elliptic integrals with modulus $k\in(0,1)$ to avoid the issues related to complex variables.
In what follows I have tried to link the integral of modulus greater than $1$ with those of modulus less than $1$.
Let $k>1$ and consider $$K(k) =\int_{0}^{1}\frac{dx}{\sqrt {(1-x^2)(1-k^2x^2)}} $$ Splitting the range of integration into $[0,1/k]$ and $[1/k,1]$ we get $$K(k) =\frac{1}{k}K\left(\frac{1}{k}\right)-i\int_{1/k}^{1}\frac{dx}{\sqrt{(1-x^2)(k^2x^2-1)}}\tag{1}$$ and let $x=1/\sqrt{1-k'^2y^2}$ then we have $$dx=\frac{k'^2y\,dy}{(1-k'^2y^2)^{3/2}}$$ and $$1-x^2=-\frac{k'^2y^2}{1-k'^2y^2}$$ and $$k^2x^2-1=-\frac {k'^2(1-y^2)}{1-k'^2y^2}$$ and hence we arrive at the relation $$K(k) =\frac{1}{k}\left\{K\left(\frac{1}{k}\right)-ikK\left(k' \right) \right\} $$ Here $k'=i\sqrt{k^2-1}$ is purely imaginary and with some manipulation one can show that $$K(k') =\frac{1}{k}K\left(\frac {\sqrt{k^2-1}}{k}\right)$$ and thus we arrive at $$K(k) =\frac{1}{k}\left\{K\left(\frac {1}{k}\right)-iK\left(\frac{\sqrt{k^2-1}}{k}\right)\right\}$$ where $k>1$. Replacing $k$ with $1/k$ we get the typical representation of the above formula as $$K(1/k)=k(K(k)-iK(k'))\tag{2}$$ where $0<k<1$.
My question is about the choice of $i$ in equation $(1)$. We could equally well have used $-i$ instead of $i$. How does one choose the correct sign of $i$?
The DLMF reference (equation 19.7.2) gives the rule that the sign of $i$ is opposite to that of imaginary part of $k^2$. But that does not help here as $k^2$ is real.
The derivation above was more to confirm that my calculations are correct and one does not need to get bogged down into them.