Fix gcc build
Add include for std::logic_error