Unfortunately, a full reinstall would be the only solution I can think of and I do not know if your cell provider will allow such a large download (4+ GB). Are you using your iPhone as a "hotspot"/wireless internet sharing for that iMac?
If your used iMac came with Mountain Lion, then I'd suggest the drive to a store or someplace like a Starbucks maybe? Another concern that might come up: did that iMac come with Lion or Mountain Lion originally? If it came with an OS version older/earlier than what is installed, you will not be able to reinstall the OS as the license for any OS purchased at the app store is not transferable. So, even if your phone were to work, you may not be able to download/install it.