Fix endian issue when emiting constant to code buffer