sim: cpu_sim: make it build under g++