I don't know if this helps or not, but I was having the exact same problem, and the only way I could get around it was extracting the cookie in the main page then passing it to the include file.
You mean passing it to the function in the include file or inporting it using global()
Those are the only ways to get them into a function. :-)