Revert r196490 and fix include paths in makefile-based build