While I think you'll be able to use a 780M in your 2011 iMac, it will not be possible to use one harvested from a 2013 iMac, as in those models the GPU is soldered down and not a removable MXM card. Here is a picture of the 2013 iMac logic board to see what I'm talking about: https://www.ifixit.com/Teardown/iMac+Intel+27-Inch+EMC+2639+Teardown/17828#s52993