Fix Lightrec build on Windows and Linux