Use a Mini Displayport cable to connect a Late 2013 rMBP to a 2009 iMac?
My late 2009 iMac works as an external display for my Early 2013 15" Retina MacBook Pro, and for my Mid 2014 15" Retina MacBook Pro, using this cable. Both laptops have Thunderbolt; the iMac does not have Thunderbolt.

I don't have a Late 2013 Retina MacBook to test, but it seems reasonable to assume it has the same compatibility.