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

@eddyb and I needed this to enable libc but disable threading