tdb2: use HAVE_LIBREPLACE instead of _SAMBA_BUILD_.