I think those iMacs only used SO-DIMMs, like those found in laptops; it was only later that Apple moved to standard DIMMs for the iMac. Check the specs on the machine. If it turns out that the iMac does use standard DIMMs, then there should be no problem using that memory.
Good luck,
Nick