Bug 1088641: Strip all but the low-bytes of characters when calling base64.encode without a charset.

This is what our base64 implementation used to do.