Exciton effects on X-ray absorption edges in metals