Windows issue with global singleton