Use MARIADB_BASE_VERSION instead of LIBMARIADB to detect Maria DB

It was discovered that MariaDB 10 didn't define LIBMARIADB leading
to compilation errors of MySQL DLZ modules on Debian stretch.

Use MARIADB_BASE_VERSION instead which is defined in all tested MariaDB
versions.

(cherry picked from commit 5835aae6)
65 jobs for !6225 with 2813-build-named-with-dlz-is-broken-with-MariaDB-10-v9_18 in 54 seconds (queued for 9 seconds)
latest merge request