fix base64 encoder
The old implementation relied on undefined behavior (reading from a union member not most recently written to), implementation-defined layout and only worked on little endian.
This should make the vtktest
test pass on big endian architectures.