compute redirect_uri in runtime
ruby 1.9.2 support: use host instead of hostname