Only happening while the installer is running, because in this case the current working directory is /install/.
Introduced by the changing the path from
include_once(__DIR__ . '/lib/ldap.php');
to
/* include ldap support */
include_once('./lib/ldap.php');