Add some magic to define __dead on non-BSD systems/where it's undefined
Wrap prototypes in __BEGIN_DECLS, as with best practice