fix charm version check

It would fail if major == 0.