bugfixes to windows atomics implementations