Energy spectra and magnetic properties of diatomic molecules in the presence of magnetic and AB fields with the inversely quadratic Yukawa potential