Moved -lz -lpthread -ldl later for static tests