Nonstoichiometry and critical temperature of MgB2