[rakefile] Fix get_version function