improve portability of byte order test
making allocation functions customizable adding ios_vprintf simplifying config variables for mac