iMac display flickering/blinking



I have a iMac 24 inch Core 2 Duo (Early 2009). I installed a new SSD drive a year ago and it's been working great since. But recently the display started to flicker or blink. By flicker, I mean the display going from lit normally to completely black rather quickly and randomly. It starts doing it shortly after booting or waking up after warming up. I can then also make the display to flicker by banging on the sides.

I opened it and checked the display connector to make sure it was connected properly. The connector seems just fine. It looks like a hardware issue but I don't know what to look for. Any idea?

Machine Model: iMac9,1
Family name: A1225 EMC 2267
Model Number: MB419LL/A