Theory of infrared and Raman intensity of the lattice vibrations of molecular crystals. Application to solid ammonia and benzene