Fix the tests-lua crash on windows platform