improved cmake patch

improved cmake patch to fix include issues.