Fix crashes with browser capabilities

Correct https://bugzilla.xamarin.com/show_bug.cgi?id=14720 and
probably https://bugzilla.xamarin.com/show_bug.cgi?id=13014

Signed-off-by: Etienne CHAMPETIER <etienne.champetier@fiducial.net>
Signed-off-by: Frederic Mestayer <f.mestayer@fiducial.net>

in mcs/class/System.Web
make run-test PROFILE=net_2_0 ok
make run-test PROFILE=net_4_0 ok
make run-test PROFILE=net_4_5 ok

make run-test PROFILE=net_3_5 doesn't run at all on my system