Generally, it's better to set such variables after the inclusion of the extension in LocalSettings.php - I believe that's true for most extensions.