fix some casting errors in smbencrypt and some multiply-defined errors