Fix release mode build errors.