Fix compilation for pre-C++11