Those functions should work whether you have cgi installed or not. Is it, by any chance, a permission problem? I know that our apache server runs as "nobody", so if we want to exec() anything we have to make sure that nobody has proper rights to it.
As for installing the cgi executable, it's suggested that you also compile with the --enabable-discard-path option, for security. Then, at the top of all your scripts, you must include the line "#!/usr/local/bin/php -q"