It's hadn't. If I remember correctly from learning grammar back at school, it has something to do with "wish"ing. If I'm not mistaken, if you wish for something that's in the past, it means you cannot change the fact (because it already happened) so you use past perfect.
A: Why didn't you call me to help you out? It was my day off yesterday.
B: I wish I had thought about it.