Fix preprocessor directives for compiling on Linux/Windows OS