Restore asset_url for Rails 3.x

And only test javascript_url/stylesheet_url on 4.0+.