Added compile-time detection of OS and compiler