Stop safari from blowing up

Fixes #138 and #173 

@zackbloom @TrevorBurnham @marcneuwirth 
@Friss I'm a bit confused here. This compiles to `from.indexOf(val) >= 0`. But `from` is an object like `window.WebSocket`, which doesn't have an `indexOf` method... right?