Make compatible with go version 1

Tested with simple ldap client.