Investigation of the structure of shock waves in boron nitride and graphite in the region of polymorphous transformation