make erlang mode work on osx and ubuntu