Some bundled dependency cmake related fixes