fix charm version check

It would fail if major == 0.
Merge pull request #162 from jesrui/master

fix charm version check