linux fixes, shared_ptr, compilation options