Fix cmake detection of build platform endianness

Improve comments to indicate actual usage of WORDS_BIGENDIAN where
it is tested with #ifdef rather than #if