Remove dependency on C++11 and add missing headers