gem install mysql2 on Debian Wheezy with MariaDB 10

Just in case you would be in this situation (and given the fact I couldn't find online information about it), if you are ever installing the mysql2 gem on a Debian Wheezy system with MariaDB 10 (I would guess a rather rare situation), you might get this error:
# gem install mysql2 -v=0.3.11
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
 ERROR: Failed to build gem native extension.

 /usr/bin/ruby1.9.1 extconf.rb
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()...