fix build errors on linux