Agi-bin problem

I have FreePBX 2.4.0 installed on my Gentoo server. But in dialparties.agi I have to switch these lines:
require_once “phpagi.php”;
require_once “phpagi-asmanager.php”;
with these lines:
define(“AGIBIN_DIR”, “/var/lib/asterisk/agi-bin”);
require_once (AGIBIN_DIR."/phpagi.php");
require_once (AGIBIN_DIR."/phpagi-asmanager.php");

I would prefer not having to do this everytime dialparties.agi gets reinstalled but require_once needs the path. What configuration do I need to change to fix this please?