fix pass by reference changes for php 5.4