s3:build: check for availability of external libtdb and use it if available