Near field phonon–polariton spectroscopy as a method for studying the optical properties of nanofilms