Thermal treatment for preventing void formation on directly-bonded InP/Si interface