Use unique_ptr if available; else fall back to auto_ptr