Extreme-ultraviolet extinction measurements on hydrogenated and dehydrogenated amorphous carbon grains