Optical Activity of Solids from First Principles