Fix interop with Chrome for Android

These two changes fix interop with Chrome for Android version 37.0.2062.117 on my nexus 5. b2e8536 is pretty obvious, it fixes an instance where an exception was thrown with "throw" instead of going through the required hoops needed to handle errors. d7d50d4 is a workaround for a bug in chrome for android, but it's innocent enough to go in IMO.