build: autodetect platform

Let's not assume that we are running on linux.