Fix tests which start failing from go 1.2

Some tests are failing because of API change in go 1.2.