[install script] Refactors NVM_SOURCE

Deduplication of the code that was defining the source to install NVM from.
`unset -f` unsets functions, whereas `unset` unsets variables, not functions.