more changes to make it compile on windows, still some linking issues