[perl #120635] don't leak semaphores

I was calling semctl() with parameters in the incorrect order