configure: check for ICE and SM libraries too

Change-Id: Id86b09c9f2fe8770da8cc6b13672e2bf37201962
(cherry picked from commit 415dfd0d89f550268dc66d4e7d447c1975a8aa44)
Reviewed-on: https://gerrit.libreoffice.org/7349
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>