Add Functor instance for Ref