PHP: Fix broken dependencies in newer Debian and Ubuntu systems for --with-ldap --with-gmp (better fix)