fix build errors on ubuntu