Use MySQLi if Wordpress supports it. Wordpress will start supporting it on 3.9.x.

This change is tested in 3.9 beta