Add missing dependency to check in Makefile

The main makefile check target does not depend on tests. When running
make with the -j option it could happen that the tests are build twice
and concurrently, which causes errors.
diff --git a/Makefile b/Makefile
index d2fa6b8..d475868 100644
--- a/Makefile
+++ b/Makefile
@@ -77,7 +77,7 @@
 	find . \( -name \*.gcno -o -name \*.gcda -o -name \*.info \) -exec rm {} +
 endif
 
-check: lib
+check: lib tests
 	$(MAKE) -C tests check
 
 test: check