Fix the base encoding issue with Ruby 1.8.7 Compliance