This isn't really an osTicket question, but I'll bite.
If you're building from source, use with-imap flag when compiling:
$./configure --with-imap
To get a list of other flags used to compile PHP, check the config.log in the build directory or use phpinfo(). Then you'd recompile using the same glas, and just adding the with-imap flag to the list.
More info: http://us3.php.net/imap(http://us3.php.net/imap)
However, that said, it's a bit tricker to do it in Leopard: http://joshhuckabee.com/compiling-php5-imap-support-os-x-leopard(http://joshhuckabee.com/compiling-php5-imap-support-os-x-leopard)
Alternately, just use MacPorts:
$ sudo port install php5 +imap
If you don't have MacPorts installed, you can get the DMG here: http://www.macports.org(http://www.macports.org)
Personally, I'd compile from source because I think the end result is and less prone to conflicts, but that's just me. Most people will never have problems, either way.