Cross compile

This works for darwin and linux. For windows, the syslog directives in mig.logging are getting in the way. I'll fix it later.