Namespace fixes
Add missing #include
Use signal-based segfault handling under Darwin too