autodetect mac platform