Reverted 9188e3bcef9ab54aaf4755895c1cca1b38fd0c29 and added missing include to get std::auto_ptr working