Simplify version extraction

Thanks, @rejeep