Fix some missings "consts" in C++03 and make it call abort() when we are not using
exceptions.