iMac running OS X 10.2.8 doesn't get an IP address on Wi-Fi
If the iMac is indeed limited to WEP security, an alternative would be to use a 'wireless gaming adapter' such as this one. Originally marketed to Xbox 360 users who did not want to buy the official wireless adapter, these devices handle the wireless connection (using stronger WPA/WPA2 security) and provide an ethernet connection to the iMac.