Upper critical field and irreversibility line in superconducting MgB2