Make truncate work for Ruby 1.8