Set MIT_PTHREADS to use the supplied mit-pthreads.
This is a workaround for PR ports/12824.
- replace one occurance of gcc with ${CC}
- don't use CFLAGS twice somewhere in mit-pthreads compilation
(There is still one place left where CFLAGS are used twice.)