fix behavior when a username isn't unicode

fixes http://manage.dimagi.com/default.asp?83611