glibc wants -lpthread at the end