Fix for mac compilation and maybe windows.