Fix version check

Not all Erlang versions are of equal length. Added clauses to handle this.
Merge pull request #85 from imtal/patch-1

Fix version check