Modular invariance of SU (1,1) strings