more flexible version number parser