Fix numpy version checks

Closes gh-2998. 

Note that no existing version string parsers in distutils/setuptools/distutils2 work well, so this is the simplest solution I think.