Added c++11 autotools macro, some compilation fixes