The building materials giant will shift its primary listing to New York under a plan to merge with American group Azek.