Replace ath based mutexes by gpgrt based locks.