The Nash-Moser technique for an inverse problem in potential theory related to geodesy