Added function to convert a 64 bit word to big endian representation. Not sure if it will solve any problems, have tried unsuccessfully.