Rewrite dtype so it is safe with unicode_literals