Recycling of polymeric materials by pyrolysis