Fixes for C++11 and the new sge API