Improve version check

Move version check so it is the very first thing we do.
Perform version check for all platforms
Ensure backwards and forwards compatibility
Merge pull request #697 from Atheros1/master

support pyelliptic's updated HMAC algorithm
Merge pull request #696 from bmng-dev/Issue-#689

Improve version check.