It would not have been very difficult to pivot AIM into making money. First you add social media style profiles, then ads, then integrations, then feeds... none of this would have relied on mobile. Facebook didn't rely on mobile for many years after formation - the iPhone came out a couple of years after facebook did, and it took a few more years before smartphones saturated the market.
Of course, it's easy to say this today having seen the result. But aol in particular was familiar with ad-driven business; they should have had the appropriate resources to anticipate the potential of their businesses.