C++ fixes for old gcc (SLE_11, RHEL-6)

I appreciate that onion seems to be very portable. Here is a minor fix to let it build on current suse and red hat enterprise.