adding preprocessor defs for BSD/Linux