This problem seems to be a variant of this one, but the same argument doesn't hold here since we can't say that $f$ is determined by its values in the unit square.
I tried to reduce the problem to the original one by defining $g(z)=f(z)+iz$, which doesn't work since it gives $g(z+i)=g(z)$, $g(z+1)=g(z)+2i$. Any clues on how to approach this?