Fix the mac builds.

Account for the death of function.(cpp|h) and functiondef.h.

Also fix includes.