Since you use the two `[[ ]]` test form, this is bash (or ksh), so :
#!/bin/bash
glib=$(ldd --version | awk '/ldd/{print $NF}')
if [[ $glib == 2.17 ]] && systemctl | grep -q '\.mount'; then
echo "I have to execute certain specific stuff to glib ver 2.17"
fi
### NOTE
* use `$( )` not `` in modern shell
* place spaces around `[[` and `]]`
* your regex try is better written with a grep