Fix erlang REPL on OSX.

Cast pos to long.