Updated to go 1.0 (error handling changes).

Also removed non-standard defines that don't compile on my linux box.