Fix list-symbols.sh

- make it work on Linux
- use all three libraries
diff --git a/tests/scripts/list-symbols.sh b/tests/scripts/list-symbols.sh
index 82b6cc9..c258719 100755
--- a/tests/scripts/list-symbols.sh
+++ b/tests/scripts/list-symbols.sh
@@ -16,7 +16,11 @@
 scripts/config.pl full
 CFLAGS=-fno-asynchronous-unwind-tables make clean lib >/dev/null 2>&1
 mv include/mbedtls/config.h.bak include/mbedtls/config.h
-nm -gUj library/libmbedtls.a 2>/dev/null | sed -n -e 's/^_//p' | sort > exported-symbols
+if uname | grep -F Darwin >/dev/null; then
+    nm -gUj library/libmbed*.a 2>/dev/null | sed -n -e 's/^_//p'
+elif uname | grep -F Linux >/dev/null; then
+    nm -og library/libmbed*.a | grep -v '^[^ ]*: *U \|^$\|^[^ ]*:$' | sed 's/^[^ ]* . //'
+fi | sort > exported-symbols
 make clean
 
 wc -l exported-symbols