Kernels of Selfhood: GPT-4o shows humanlike patterns of cognitive consistency moderated by free choice