Fix for ubuntu 12.04 when using mariadb.