The upper critical field in superconducting MgB2