FIX: use mysqli_real_escape_string if TYPO3 Version >= 6.1

Since TYPO3 6.1 we use mysqli for Database stuff so mysql_real_escape_string won't work.
We have to use mysqli_real_escape_string.