Anisotropies of the cosmic microwave background in nonstandard cold dark matter models