Change way to figure our whether args should be sent by ref
Do this in a way which should work with PHP <= 5.7.0 *and* above
See https://github.com/php/php-src/commit/0d7a6388663b76ebed6585ac92dfca5ef65fa7af