adding fallback to mt_rand() in random string generation