Add -pthread to compopts to avoid errors on linux