Added pre-processor macros to enable cross platform compilation