test/Makefile.am: Fix issue with --disable-static.

Simple fix to `test/Makefile.am` which allows `make check` to succeed if `--disable-static` is passed to `configure`.  `--disable-static` is nice as it gives (on my machine) ~40% faster compile times by not double-compiling every object file.