changed sem_close() to sem_destroy()

http://www.mkssoftware.com/docs/man3/sem_destroy.3.asp