This problem is inherent to the way cloaked forwarding (also called stealth forwarding) works. However, we have developed a little trick that still allows your code to know the referrer.
Go to the settings of your domain name and add the tag "<referer>" to the 'content for search engines'. When you do this, the referer will be added to the querystring.
Note, this doesn't mean that the regular http_referrer information now is correct. But with a small modification to your own software, it is thus possible to recognize the referrer.