Calculation of Tc and the ratio 2Δ(0)/kBTc of MgB2 within a two-band model of superconductivity