Fix compilation on Windows when using shared libs