mariadb: guard post-install for client-only builds

Closes #20519.