Two-photon optical bistability of polar molecules inserted in a solid matrix: Phonon effects