when did north carolina officially become a state