[BUGFIX] Charset config uses deprecated TYPO3 option forceCharset

Since TYPO3 4.7 the option
$GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] has been removed
and TYPO3 uses UTF-8 by default.

A hardcoded iso-8859-1 charset returns records with empty DN,
if DN contains umlauts.

This patch provides an if condition which checks the current
TYPO3 version and sets charset to UTF-8 if using TYPO3 >= 4.7.

Resolves: #60080
Change-Id: Ic84bff6522e07e7ec0fe3e5bcb6cf0971cb79034
Reviewed-on: https://review.typo3.org/31311
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers