Makefile: make test target use thread