Use shared_ptr instead of unique_ptr for gcc 4.4
Enable rtti on linux for gcc 4.4