Modular Invariance in Supersymmetric Field Theories