Fix mutex on FreeBSD

I made a fix for FreeBSD on mutex.