Added ifdefs to main.cpp to make it work on windows and linux