autodetect MySQL 5.5+ connection charset