Fix call-time-pass-by-reference that throws fatal errors in PHP >= 5.4
Remove more call-time-pass-by-reference cases.
Merge branch 'issue-49' into travis