add cross-compilation support for go compiler

This adds cross-compilation support to the Go compiler.