Add if defined macro
The return value of strcmp strncmp on Linux and BSD is different