mysql_escape_string is deprecated in PHP 5.5

This gets rid of a deprecation warning which is erroring some tests.
Merge pull request #4065 from giant-rabbit/mysql-escape-fix

mysql_escape_string is deprecated in PHP 5.5