support installation on the system

Like the old autotools installation this change allows installation in
the Erlang system so it can be used widely.
ERLANG_DIR can be set by the user.