Ensure floats are little-endian encoded

Potential issue on big-endian machines, discovered by @domsj.