Presidential term limits were enacted via the 22nd Amendment. An amendment is a change to the constitution - in other words, becomes part of the constitution.
It would take a new amendment, repealing the 22nd, to eliminate Presidential term limits - something that has to be passed by Congress and then ratified by the states (just as the 21st Amendment repealed the 18th Amendment).
That makes the make-up of the court irrelevant, since it would be hard for any court to declare the Constitution, or some part of the Constitution, as unconstitutional.
The only way the court could conceivably figure into this is if the amendment's approval process were suspect. The 22nd took nearly 4 years to be ratified, which makes it one of the three longest ratification periods, but it doesn't even compare to the longest (the 27th Amendment took 203 years to be ratified by the states and easily has the most questionable approval and ratification process).