All references to tr1 namespace removed. R.m4 updated to add c++11 flags.