Make code Go 1.0.* compatible. Fixes #1.