There have been US Presidents who were born in territories before they became states. I believe that precedent would hold in the case of Alaska or Hawaii -- can't see why it wouldn't.
I was looking for a precedent, since I didn’t know if the issue had ever been settled.