Fix another build error on MinGW systems.

On MinGW system do not try to link against libpthread if that library is not
actually present on the system.  This is an issue in the compiler directory
because we link the compiler against the thread libraries regardless of the
grade.  This is due to the implementation of --make.

configure.ac:
	On MinGW, if we cannot find pthreads then set THREAD_LIBS to empty.