Simplify major version parsing
Simplify major version parsing

Co-authored-by: Kenichi Maehashi <50f3f01caa053693ce619d596e14b0ff3901ab49@kenichimaehashi.com>
chainer/chainer,chainer/chainer,chainer/chainer,chainer/chainer