Crosslinking and thermal stability of thermosets based on novolak and melamine