fixing linux build problems, changing debugging api to return reference to strings
rather than making copies