Thermal leptogenesis in the presence of helical hypermagnetic fields