Repository: nvm
Issue: Install of old Node.js versions aborts with "Could not autodetect OpenSSL support"
Labels: installing node

- Operating system and version:

macOS High Serrira v10.13.6

- `nvm debug` output:

<details>

```sh
$ nvm debug
nvm --version: v0.33.11
$TERM_PROGRAM: Apple_Terminal
$SHELL: /bin/bash
$SHLVL: 1
$HOME: /Users/medikoo
$NVM_DIR: '$HOME/.nvm'
$PATH: $HOME/anaconda3/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:~/Library/Python/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17)'
uname -a: 'Darwin 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64'
OS version: Mac 10.13.6 17G65
curl: /usr/bin/curl, curl 7.54.0 (x86_64-apple-darwin17.0) libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
wget: not found
git: /usr/bin/git, git version 2.15.2 (Apple Git-101.1)
grep: /usr/bin/grep, grep (BSD grep) 2.5.1-FreeBSD
awk: /usr/bin/awk, awk version 20070501
sed: illegal option -- -
usage: sed script [-Ealn] [-i extension] [file ...]
       sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
sed: /usr/bin/sed, 
cut: illegal option -- -
usage: cut -b list [-n] [file ...]
       cut -c list [file ...]
       cut -f list [-s] [-d delim] [file ...]
cut: /usr/bin/cut, 
basename: illegal option -- -
usage: basename string [suffix]
       basename [-a] [-s suffix] string [...]
basename: /usr/bin/basename, 
rm: illegal option -- -
usage: rm [-f | -i] [-dPRrvW] file ...
       unlink file
rm: /bin/rm, 
mkdir: illegal option -- -
usage: mkdir [-pv] [-m mode] directory ...
mkdir: /bin/mkdir, 
xargs: illegal option -- -
usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements]] [-J replstr]
             [-L number] [-n number [-x]] [-P maxprocs] [-s size]
             [utility [argument ...]]
xargs: /usr/bin/xargs, 
nvm current: system
which node: /usr/local/bin/node
which iojs: 
which npm: /usr/local/bin/npm
npm config get prefix: /usr/local
npm root -g: /usr/local/lib/node_modules
```
</details>


- `nvm ls` output:
<details>

```sh
$ nvm ls
       v0.12.18
         v4.8.7
        v6.10.3
        v6.12.2
         v7.5.0
         v8.9.4
        v8.10.0
        v8.11.1
        v9.11.1
->       system
default -> system
node -> stable (-> v9.11.1) (default)
stable -> 9.11 (-> v9.11.1) (default)
iojs -> N/A (default)
lts/* -> lts/carbon (-> N/A)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.14.3 (-> N/A)
lts/carbon -> v8.11.3 (-> N/A)
```
</details>

- How did you install `nvm`? (e.g. install script in readme, Homebrew):

Install script in readme

- What steps did you perform?

```sh
nvm install v0.4
```

- What happened?

```
$ nvm install v0.4
Clang v3.5+ detected! CC or CXX not specified, will use Clang as C/C++ compiler!
Local cache found: $NVM_DIR/.cache/src/node-v0.4.12/node-v0.4.12.tar.gz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/src/node-v0.4.12/node-v0.4.12.tar.gz
$>./configure --prefix=/Users/medikoo/.nvm/v0.4.12 <
Checking for program g++ or c++          : /usr/bin/g++ 
Checking for program cpp                 : /usr/bin/cpp 
Checking for program ar                  : /usr/bin/ar 
Checking for program ranlib              : /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for program gcc or cc           : /usr/bin/gcc 
Checking for gcc                         : ok  
Checking for library dl                  : yes 
Checking for openssl                     : not found 
Checking for function SSL_library_init   : not found 
Checking for header openssl/crypto.h     : not found 
/Users/medikoo/.nvm/.cache/src/node-v0.4.12/files/wscript:341: error: Could not autodetect OpenSSL support. Make sure OpenSSL development packages are installed. Use configure --without-ssl to disable this message.
nvm: install v0.4.12 failed!
```
- What did you expect to happen?

I expected Node v0.4 to be installed, especially that OpenSSL is installed on my machine:

```sh
$ openssl
OpenSSL> ^C
$ which openssl
/usr/local/bin/openssl
```