add mutex around windows initialization