better fix for mutex lock issue with glib2-2.41.2

Thanks to dcharlespyle