I also had to build the Arduino software from the github source to get the DNS functions to work. Both the Windows and linux-64bit downloads would return 0.0.0.0. Once I built the software from source the same code worked.
Thank you for sharing this!