fix windows and osx ifdefs