Fix compilation errors with missing -ldl and -lpthread, fix #20