Fixed PHP 5.1.0 / 5.0.5 reference problem, closes #80
Merged in changes from branches/0.10 revision 0a92cb855c43b24e78b55a3c10adb4e00489e117, references #80