There are two ways:
1. change the extends of JdDatabaseAdapter from JDatabaseDriverMySQLi to JDatabaseDriverMySQLi_Fab in the file libraries/jdiction/database/driver/mysqli.php you maybe have to load the fab database driver file before with require_once(JPATH_SITE.'/components/com_fabrik/driver/mysqli_fab.php');
2. add the following code to the JdDatabaseAdapter class in libraries/jdiction/database/driver/mysqli.php
public function replacePrefix($sql, $prefix = '#__')
{
$app = JFactory::getApplication();
$package = $app->getUserStateFromRequest('com_fabrik.package', 'package', 'fabrik', 'cmd');
if ($package == '')
{
$package = 'fabrik';
}
$sql = str_replace('{package}', $package, $sql);
return parent::replacePrefix($sql, $prefix);
}