Improved MySQLi integration in installer

mysql_* functions are expected to be removed in future PHP versions.
Installer will now work without them.