Drop MySQL 5.1 support

Use `mysql_mutex_t` instead of `pthread_mutex_t`.