Fix the test suite for 1.8.7
pack("m0") seems to include newlines in ruby 1.8 but does not in either the
javascript btoa() function or in pack("m0") in 1.9 so we're just stripping
the newlines in the test encoded path to mirror this behavior.