Added a hack for older versions of PHP

For some unknown reason 500s are generated, this patch fixes it, but I
don't know why -- no errors are being generated.