Check for the -pthread switch instead of using _REENTRANT