They are both natural.
Technically, the 2nd is the correct one as the 'past perfect subjunctive' tense is used for talking about past hypothetical situations which is what you are doing here.
The first uses 'past subjunctive tense' which is *supposed* to be used for hypothetical situations in the present or future. That's not the case in your example - you are talking about the past. In reality though, "If I were you" is also commonly used in talking of past hypothetical situations. It's become like a standard phrase, rather than something needing to be conjugated correctly.
So speakers will use both sentences. If they use the 2nd, they'd almost always abbreviate "I had" to "I'd" in conversation.