Avoid notice thrown in debug().

In a test case, I got

    Use of undefined constant CAKE_CORE_INCLUDE_PATH - assumed 'CAKE_CORE_INCLUDE_PATH

    ...\vendor\cakephp\cakephp\src\basics.php:55

when using `debug($foo);`.

In other places where this constant is being used there is a check for it:

	if (!defined('CAKE_CORE_INCLUDE_PATH') || !defined('APP')) {
		return $path;
	}

So the same thing should be used here.