Browser sampler fixes

In case you're still maintaining this branch.  Here is a minor fix that makes the `Sampler` class work in Safari.