Disable atomic refcounts with no-threads
This is needed for building with '-march=i386 no-threads', on platforms
where libatomic is not available (djgpp, specifically).  The
implementation now falls back to 'CRYPTO_atomic_add()', which performs
plain lock-free addition in a 'no-threads' build.
# include <openssl/e_os2.h>
# include <openssl/trace.h>
-# ifndef OPENSSL_DEV_NO_ATOMICS
+# if defined(OPENSSL_THREADS) && !defined(OPENSSL_DEV_NO_ATOMICS)
# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L \
&& !defined(__STDC_NO_ATOMICS__)
# include <stdatomic.h>
