dhcpserver: support cplusplus Closes IDFGH-5786 and IDFGH-5821 See merge request espressif/esp-idf!15018