Perry endorses former rival Romney for president