Backport Base64#urlsafe_decode64 and Base64#urlsafe_encode64 to try to fix Ruby 1.8.7, REE, JRuby.