Added missing link flags for threaded example.