Hospital bends rules to let dying man see his dog