The 802.11n in the iMac uses the 5GHz band, same as 802.11ac, so wavelength is OK. There may be some antenna design tweaks due to the larger channels and different MIMO capabilities, but if you're not trying to pick up a signal on the fringe of your coverage area chances are good the antenna will work OK.
Of course until/unless there is an actual card to put in your iMac, it's just an academic exercise.