Add deref() support for PHP5.3