Total gamma ray cross sections in oxygen, fluorine and chlorine