Fixed pthread to lpthread for compatibility