NiO and MgO ultrathin films by polarization dependent XAS