build: autodetect platform