Conditional import of urlencode