Check for IE8 in theme_preprocess_page function
No there is no reliable way to detect browsers. Furthermore, you should not check browser compatibility from the server-side. 

You have a few alternatives:


In your module or theme, add IE-specific styles (hide the SVG, show an image instead, likewise). This is well covered in the handbook page. 
If you do not need to add the stylesheet to every page, then you can add the stylesheet in your preprocess hook (#attached is recommended. See this and this.)
Javascript workaround. Again, checking the user agent is not that easy and fool-proof. You can check SVG compatibility either by using a library available, or just by trying to create an SVG element and see if it work. This and this covers it well.