Fix build errors on some configurations.