Fix some compile problems with BSD and win32