Fix test build errors