Spontaneous CP violation and quark mass ambiguities