Thermodynamics of two flavor QCD from imaginary chemical potentials