build: autodetect platform
Merge pull request #391 from dmarion/autodetect-platform

build: autodetect platform