Fix erlang installation logics for RHEL5.x