Fixed PHP 5.1.0 / 5.0.5 reference problem, closes #79
Merged in changes from branches/0.10 revision 359, references #79