encode.h: use autoconf macros to determine proper header
encode.h: use autoconf macros to determine proper header

Existing approach improperly used <strings.h> on non-Contiki/non-BSD builds.
The old test remains enabled for backwards compatibility.

pabigot/libcoap,pabigot/libcoap,pabigot/libcoap