Add #[cfg(pthread)] to concurrent and thread modules