Fix mutex deprecation warnings

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>