Microsoft takes $6.2B hit to account for ad woes