cross platform code for recursive mutex init