If $m=2$ we can take $J$ to be a rotation by $\pi$. Now assume by induction that for vector spaces $V$ of even dimension $\leq m$ we can find $J:V\to V$ with $J^2 = -I$. Now let $W$ be of dimension $m+2$. Pick a basis $(e_1,\ldots,e_m,e_{m+1},e_{m+2})$. Then the span $S_1$ of $(e_1,\ldots, e_m)$ and $S_2$ of $(e_{m+1},e_{m+2})$ are both of even dimension $\leq m$, so we can choose $J_1:S_1\to S_1, J_2:S_2\to S_2$ with $J_1^2 = I_{S_1}, J_2^2 = I_{S_2}$. Extend $J_1,J_2$ to all of $W$ by making them fix the basis vectors which have not yet been specified in their definitions. Then $J:= J_1J_2$ satisfies $J^2=-I_{W}$ since $J_1,J_2$ commute.
Thus we have shown that if $m$ is even, we can find $J$ with $J^2=-I$. Next suppose that we have a $J^2 = -I$. Taking the determinant of both sides gives $(\det J)^2 = (-1)^m$. Since the left side is positive, it must be that $m$ is even.
You can now finish the rest of the problem showing isomorphism to $\mathbb{C}^{m/2}$ in the obvious way when $m$ is even.