Global Aspects of Electric-Magnetic Duality