Quasiparticle description of quantum chromodynamics at finite temperature in the presence of magnetic fields