Fix misc build errors.