Detect platform type when compiling