You can install a separate python 2.6 stack - e.g: http://pkgs.org/centos-5-rhel-5/epel-i386/python26-2.6.8-2.el5.i386.rpm.html
This won't interfere with the default CentOS 5 python 2.4 install
I think the firefox build process looks for a 'python2.6' binary - if not, then just add a line to your mozconfig like:
PYTHON=python2.6
I didn't do this, as I already had access to a locally rebuilt 2.6 install - but I guess the above should work, although I have no idea how much of the 2.6 stack will be required ...
Thanks, James! The epel version of python26 works fine, and the only other package I needed was yasm from rpmforge. Build took <13m on a reasonable machine :)