Added pthread setup to cmake file