mariadb: fix build with clang when boost is present

Closes #23910.