Fix compilation on OSX and win32

Probably.