Fix compilation issues on g++.