adds safemode to allow swig to run in CSP-strict environments like node-webkit and atom-shell