D support

Another set of patches. Includes a fix for <http://public.kitware.com/Bug/view.php?id=14843> as well.