fix when doing install_as_mysqldb with pymysql