Fix when mysqli is disabled. Issue #1347