The macro THREADS was changed to OPENSSL_THREADS a long time ago.