Cosmology of an axion-like majoron