Make code compatible with Erlang < R16B
Merge pull request #2 from weiss/old-erlang-compat

Make code compatible with Erlang versions older than R16B